{include file="./headStart.tpl"}
{literal}
<script type="text/javascript">
function formEffect(theCommand)
{
	if($('#updationRemarks').val() != '')
	{
	  if($(theCommand).attr('name') == 'complete')
	  {
	  	$('#completeBtn').val(1);
	  	$("form").submit();
	  }
	  else if($(theCommand).attr('name') == 'inComplete')
	  {
	  	$('#inCompleteBtn').val(1);
	  	$("form").submit();
	  }
	  else if($(theCommand).attr('name') == 'cancel')
	  {
	  	window.location.href = "pendingRandRList.php";
	  }
	}
	else
  {
  	if($(theCommand).attr('name') == 'cancel')
	  {
	  	window.location.href = "pendingRandRList.php";
	  }
  	$('#updationRemarks').focus();
  	return false;
  }
}
</script>
{/literal}
{include file="./headEnd.tpl"}
<form name="form1" action="{$smarty.server.PHP_SELF}" method="POST">
<table border='0' cellpadding='1' cellspacing='2' align='center'>
<tr>
  <td align="center" class="table1" colspan="4">R AND R</td>
</tr>
<tr>
  <td class="table1" align="left">Sr.No.: </td>
  <td class="table2" align="center">{$masterArray.srNo}<input type="hidden" name="rAndRMasterId" value="{$masterArray.rAndRMasterId}" /></td>
  <td class="table1" align="left">Customer.: </td>
  <td class="table2">{$masterArray.partyName}</td>
</tr>
<tr>
  <td class="table1" align="left">Complaint Date: </td>
  <td class="table2" NOWRAP>{$masterArray.complaintDate}</td>
  <td class="table1" align="left">Target Date: </td>
  <td class="table2" NOWRAP>{$masterArray.targetDate}</td>
</tr>
<tr>
  <td class="table1" align="left" NOWRAP>Send For Repair : </td>
  <td class="table2">{$masterArray.supplier}</td>
  <td class="table1" align="left">Address : </td>
  <td class="table2">{$masterArray.address}</td>
</tr>
<tr>
	<td class="table3" align="center" colspan="4" NOWRAP>
		<table border='0' cellpadding='1' cellspacing='2' align='center'>
			<tr>
				<td class="table1" align="center">Sr</td>
				<td class="table1" align="center">Sub Category</td>
				<td class="table1" align="center">Product</td>
				<td class="table1" align="center">Quantity</td>
				<td class="table1" align="center">Description of Complaints</td>
			</tr>
			{section name=sec loop=$detailArray}
			<tr>
				<td class="table2" align="center">{$smarty.section.sec.rownum}</td>
				<td class="table2" align="left">{$detailArray[sec].subCategoryName}</td>
				<td class="table2" align="left"><font size="1">{$detailArray[sec].itemName}</font></td>
				<td class="table2" align="center">{$detailArray[sec].quantity}</td>
				<td class="table2" align="left">{$detailArray[sec].complaintDescription}</td>
			</tr>
			{/section}
		</table>
	</td>
</tr>
<tr>
	<td class="table1" align="center">Remarks <font size="4" color="red">*</font></td>
	<td class="table1" align="center" colspan="3">
		<textarea name="updationRemarks" id="updationRemarks" rows="3" cols="50" required="required"></textarea>
	</td>
</tr>
<tr>
  <td class="table3" align="center" colspan="4">
  	<input type="button" name="complete" value="C O M P L E T E" onclick="formEffect(this);" />
  	<input type="hidden" name="completeBtn" id="completeBtn" value="0">
  	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  	<input type="button" name="inComplete" value="I N C O M P L E T E " onclick="formEffect(this);" />
  	<input type="hidden" name="inCompleteBtn" id="inCompleteBtn" value="0">
  	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  	<input type="button" name="cancel" value="C A N C E L" onclick="formEffect(this);" />
  </td>
</tr>
</table>
</form>	
{include file="footer.tpl"}